package leecode

func mySqrt(x int) (result int) {
	for i := 1; i <= x; i++ {
		if i*i <= x && (i+1)*(i+1) > x {
			result = i
			return
		}
	}
	return
}
